import 'package:url_launcher/url_launcher.dart';

class OpenOtherApp {
  static openWeichat() async {
    const url = 'vnd.weixin://';
    if (await canLaunchUrl(Uri.parse(url))) {
      await launch(url);
    } else {
      //  Ios
      const url = 'weixin://';
      if (await canLaunchUrl(Uri.parse(url))) {
        await canLaunchUrl(Uri.parse(url));
      } else {
        throw 'Could not launch $url';
      }
    }
  }
}
